1. Field of the Invention
The present invention relates to a storage medium control unit, data storage device, data storage system, control method for data storage device, and control program for data storage device, specifically including HDD response control for mixed sequential and random accesses.
2. Description of the Related Art
RAID (Redundant Array of Inexpensive Disks), which is for use in disk array devices, means a system for dividing and reading/writing data parallel from/into multiple HDDs (Hard Disk Drives). RAID systems employ various measures in data reading and writing, such as striping and mirroring, for an increase in speed, reliability, and fault-tolerance.
The following Patent Documents 1 to 3, for example, disclose techniques related to such disk array devices.
Japanese Published Unexamined Patent Application No. 2000-56932 (Patent Document 1) discloses a disk control unit. The disk control unit is adapted to rearrange requests within a specific allowable delay time for each request and to issue the requests for disk drives. For reducing seek distance, the rearrangement control section in the disk control unit receives and inserts each request into any position in the request queue, which is managed by the request management section, based on information given by the delay time management section and the access time management section (see Paragraph 0073).
The rearrangement control section of Patent Document 1 further scans the request table sequentially from the end of the queue and searches whether or not there is a request R (i) of the same type as the request R (x) and having a logical address “a” preceding or following the logical address “a (x)” by one block (see Paragraph 0095 and Step S204 in FIG. 10), and if such a request R (i) is found, inserts the request R (x) temporarily into the position immediately preceding or following the request R (i) and sets the access type of the request R (x) to “consecutive” (see Paragraph 0096 and Steps S206 and S207 in FIG. 10).
If no such a request R (i) is found and the logical address “a (x)” of the request R (x) to be inserted is within the range covered by the logical addresses “a” of all the requests R, R (x) is inserted temporarily into a position not to disorder the logical addresses “a” (i.e. in ascending or descending order) and then the access type “type (x)” of the request R (X) is set to “independent” (see Paragraph 0098 and Step S212 in FIG. 10). Further, if the logical address “a (x)” of the request R (x) to be inserted is not within the range covered by the logical addresses “a” of the requests R, the request R (x) is inserted temporarily into the end of the queue and then the access type “type (x)” of the request R (x) is set to “independent” (see Paragraph 0098 and Step S213 in FIG. 10). In this case, the disable flag “flag” of the request R at the end or the position immediately preceding the insert position is turned ON (no request can be inserted additionally preceding the request R).
When the request R (x) is inserted temporarily into the queue, it is also determined whether or not the estimated finishing time of the request R (x), “e (x)”, and the estimated finishing time of the request R (X+n) following the request R (x), “e (x+n)”, that are newly calculated in consideration of access time, are within the finishing time of the request R (x), “f (x)”, and the finishing time of the request R (x+n), “f (x+n)”, that are calculated by adding allowable delay time “delay (x)” to the current time, respectively (see Paragraph 0105 and Step S215 in FIG. 10). If all the estimated finishing times are within the corresponding finishing times, the temporary insert position of the request R (x) is defined as a definite insert position to complete the rearrangement processing.
On the contrary, if not all the estimated finishing times are within the corresponding finishing times, the temporary insert position is determined to be inappropriate and the change in the estimated finishing time “e” of each request R that has heretofore been made is restored to a state before the temporary insertion processing. Further, the request R (x) is inserted into the end of the queue and then the access type “type (x)” of the request R (x) is set to “independent” to complete the rearrangement processing (see Paragraph 0105 and Step S216 in FIG. 10).
Japanese Published Unexamined Patent Application No. 2004-102440 (Patent Document 2) discloses sequential read/write processing from/into storage media. The sequential processing includes: a comparison step of using a sequential processing completion sector for indicating a sector in which the sequential processing is completed and a sequential processing maximum extension sector for indicating a limit to which the sequential processing can be extended to compare the initial sector of a read/write command received during the sequential processing with the sequential processing completion sector and with the sequential processing maximum extension sector if the received command is not a sequential access; and a processing step of queueing the received read/write command in the command queue to continue the sequential processing if the initial sector on the storage medium precedes the sequential processing completion sector or follows the sequential processing maximum extension sector as a result of the comparison.
The command processing section is adapted to analyze commands received from a host device and to instruct the host transfer processing section and the disk control section to process and execute the commands. In the execution of read/write commands, the command mode such as random access or sequential access and the command queueing state in the command queue are analyzed to instruct the disk control section to perform read/write processing. Commands analyzed not to be executed or executable immediately in the command processing section are queued temporarily in the command queue. Queueing commands in the command queue allow the command processing section to change the execution order of the commands (see Paragraph 0018). The main purpose of this technique is, when a group of sequential commands are issued from a host device, allowing for a significant improvement in the command processing speed without stopping the sequential processing even if commands may be issued from another host device (see Paragraph 0008).
In Japanese Published Unexamined Patent Application No. Hei-11-85661 (Patent Document 3), the hard disk drive includes: a control processor for controlling the entire hard disk drive; a disk interface control section for controlling a disk interface for the connection with a disk control unit; a memory for storing and caching various information; a disk control section for controlling a disk; and a disk for storing actual data. The memory has: a command processing program to be executed on the control processor; a cache area for storing and caching data; a command management table for managing commands received from the disk control unit; a command queue for storing queuing commands; command queue management information for managing the number of commands registered in the command queue; a sequential read command management table for managing the processing state of sequential read commands; and a re-registration queue for re-registering commands in the command queue (see Paragraph 0018).
Sequential read commands are executed based on the sequential read command management table, and read processing is repeated by the number of times specified by the commands. Commands are registered again in the command queue for each completion of read processing. If the command queue is full, commands are registered in the re-registration queue (see Paragraph 0019). The format of the command queue includes a command field for indicating the command type such as read or write (see Paragraph 0022 and FIG. 3).
Meanwhile, for the case of mixed random read and sequential read, hard disk drives are adapted to rearrange the execution order of commands so as to give priority to sequential read. Consequently, the rearrangement of commands in hard disk drives causes random read to be carried out after sequential read, resulting in a problem of delayed random read response.
Also in hard disk control, the rearrangement of commands in hard disk drives is useful to increase the operation speed of the hard disk drives, but suffers from a problem of delayed random access response. It is thus difficult for RAID controllers for controlling hard disk drives to prevent such a rearrangement.
In Patent Document 1, the rearrangement control section is adapted to position a request R (x) exceeding its estimated finishing time at the end of the queue, which results in a problem of delayed processing of the request R (x). That is, there is a problem in that requests exceeding their finishing time remain in the queue. In addition, the rearrangement control section performs rearrangement processing, which results in a problem of delayed random read response.
In Patent Document 2, when a group of sequential commands are issued from a host device, the sequential processing cannot be stopped if commands may be issued from another host device, which results in a problem of delayed random read response, too.
Patent Document 2 also discloses queueing all non-sequential commands, if received during sequential processing, as random commands until the sequential processing is completed (see Paragraph 0006), resulting in a problem in that random commands continue to remain until the sequential processing is completed.
Patent Document 3 discloses a technique only for processing by sequential read commands, and there is no consideration about random read response delay.